home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.42
/
includes3v1
/
includes3v1.lha
/
Exec
/
Ports.i
< prev
next >
Wrap
Text File
|
1994-12-04
|
2KB
|
82 lines
{
Ports.i for PCQ Pascal
This file defines ports and messages, which are used for inter-
task communications using the routines defined toward the
bottom of this file.
}
{$I "Include:Exec/Nodes.i"}
{$I "Include:Exec/Lists.i"}
type
PortType = (PASignal, PASoftInt, PAIgnore, PFAction);
{****** MsgPort *****************************************************}
MsgPort = record
mp_Node : Node;
mp_Flags : PortType;
mp_SigBit : Byte; { signal bit number }
mp_SigTask : Address; { task to be signalled (TaskPtr) }
mp_MsgList : List; { message linked list }
end;
MsgPortPtr = ^MsgPort;
{****** Message *****************************************************}
Message = record
mn_Node : Node;
mn_ReplyPort : MsgPortPtr; { message reply port }
mn_Length : Short; { message len in bytes }
end;
MessagePtr = ^Message;
{ mp_Flags: Port arrival actions (PutMsg) }
CONST
PF_ACTION = 3; { * Mask * }
PA_SIGNAL = 0; { * Signal task in mp_SigTask * }
PA_SOFTINT = 1; { * Signal SoftInt in mp_SoftInt/mp_SigTask * }
PA_IGNORE = 2; { * Ignore arrival * }
Procedure AddPort(port : MsgPortPtr);
External;
Function FindPort(name : String): MsgPortPtr;
External;
Function GetMsg(port : MsgPortPtr): MessagePtr;
External;
Procedure PutMsg(port : MsgPortPtr; mess : MessagePtr);
External;
Procedure RemPort(port : MsgPortPtr);
External;
Procedure ReplyMsg(mess : MessagePtr);
External;
Function WaitPort(port : MsgPortPtr): MessagePtr;
External;
{ -- 2.0 fcts. -- }
Function CreateMsgPort(): MsgPortPtr;
External;
Procedure DeleteMsgPort( mp : MsgPortPtr );
External;